package com.bus.boot.entity.assist;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang.StringUtils;

import com.bus.boot.entity.assist.base.BaseBusGuestbookExt;

@Entity
@Table(name="jc_guestbook_ext")
public class BusGuestbookExt extends BaseBusGuestbookExt {
	private static final long serialVersionUID = 1L;

	public void init() {
		blankToNull();
	}

	public void blankToNull() {
		if (StringUtils.isBlank(getContent())) {
			setContent(null);
		}
		if (StringUtils.isBlank(getReply())) {
			setReply(null);
		}
		if (StringUtils.isBlank(getTitle())) {
			setTitle(null);
		}
		if (StringUtils.isBlank(getEmail())) {
			setEmail(null);
		}
		if (StringUtils.isBlank(getPhone())) {
			setPhone(null);
		}
		if (StringUtils.isBlank(getQq())) {
			setQq(null);
		}
	}

	/* [CONSTRUCTOR MARKER BEGIN] */
	public BusGuestbookExt () {
		super();
	}

	/**
	 * Constructor for primary key
	 */
	public BusGuestbookExt (java.lang.Integer id) {
		super(id);
	}

	/* [CONSTRUCTOR MARKER END] */

}